int* leftRigthDifference(int* nums, int numsSize, int* returnSize) {

	int leftSum[numsSize];
	int rightSum[numsSize];
	leftSum[0] = rightSum[numsSize - 1] = 0;
	int i = 0;
	int* answer = (int*)malloc(numsSize * sizeof(int));
	for (i = 1; i < numsSize; i++) {
		leftSum[i] = leftSum[i - 1] + nums[i - 1];
		rightSum[numsSize - i - 1] = rightSum[numsSize - i] + nums[numsSize - i];
	}
	for (i = 0; i < numsSize; i++) {
		answer[i] = abs(leftSum[i] - rightSum[i]);
	}	
	*returnSize = numsSize;
	return answer;
}